non facias malum ut inde fiat bonum

you should not make evil in order that good may be made from it

Notes

More simply, "don't do wrong to do right". The direct opposite of the phrase "the ends justify the means".